package com.hzlj.position.locate.dao;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fz.common.base.converter.QueryWrapperConverterPlus;
import com.hzlj.position.locate.common.dto.abnProhibitAreasJzry.AbnProhibitAreasJzryQueryParamDTO;
import com.hzlj.position.locate.common.dto.abnProhibitAreasJzry.AbnProhibitAreasJzryQueryResultDTO;
import com.hzlj.position.locate.common.model.AbnProhibitAreasJzry;
import com.hzlj.position.locate.mapper.AbnProhibitAreasJzryMapper;
import com.hzlj.sqjz.jz.common.constant.JzJoin;
import com.hzlj.sqjz.jz.common.model.JzJbxx;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

/**
 * 禁止区域-人员(AbnProhibitAreasJzry)表操作类
 *
 * @author lifh
 * @date 2023-03-28 10:20:35
 */
@Repository
public class AbnProhibitAreasJzryDao extends ServiceImpl<AbnProhibitAreasJzryMapper, AbnProhibitAreasJzry> {
    @Resource
    private AbnProhibitAreasJzryMapper abnProhibitAreasJzryMapper;


    /**
     * 查询列表：不分页
     *
     * @param dto 查询条件
     * @return 对象列表
     */
    public List<AbnProhibitAreasJzryQueryResultDTO> listAbnProhibitAreasJzry(AbnProhibitAreasJzryQueryParamDTO dto) {
        return QueryWrapperConverterPlus.of(abnProhibitAreasJzryMapper)
                .innerJoin(JzJbxx.class, JzJoin.jz(AbnProhibitAreasJzry::getJzId))
                .list(AbnProhibitAreasJzryQueryResultDTO.class, dto);
    }
}

